package sample.Utils;

import sample.Shapes.ArrowLine;
import sample.Shapes.Circle;
import sample.Shapes.Ellipse;

import java.util.List;

public class SplitShapArray {

    public static List<ArrowLine> getArrowLines(List<Object> totalList){
        for (Object item: totalList){
            List<ArrowLine> arrowLines=(List<ArrowLine>)item;
            if(arrowLines.get(0) instanceof ArrowLine){
                return arrowLines;
            }
        }
        return null;
    }

    public static List<Circle> getCircles(List<Object> totalList){
        for (Object item: totalList){
            List<Circle> circles=(List<Circle>)item;
            if(circles.get(0) instanceof Circle){
                return circles;
            }
        }
        return null;
    }

    public static List<Ellipse> getEllipses(List<Object> totalList){
        for (Object item: totalList){
            List<Ellipse> ellipses=(List<Ellipse>)item;
            if(ellipses.get(0) instanceof Ellipse){
                return ellipses;
            }
        }
        return null;
    }
}
